    insert 
    into
        SK_MENU
        (SERIAL, PARENT_ID, MENU_NAME, TITLE, MENU_TYPE, MENU_URL, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        (0, 0, '${m.moduleName}', '${m.moduleTitle}', 'action', '/console/${m.moduleName}/index.do', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_MENU'));
        
    insert 
    into
        SK_ROLE
        (ROLE_NAME, TITLE, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('role_${m.moduleName}_admin', '${m.moduleTitle}-管理员', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_ROLE'));
    
    insert 
    into
        SK_ROLE
        (ROLE_NAME, TITLE, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('role_${m.moduleName}_user', '${m.moduleTitle}-用户', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_ROLE'));
    
    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${m.moduleName}_index', '${m.moduleTitle}-首页', '/console/${m.moduleName}/index.do', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));
    
    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${m.moduleName}', '${m.moduleTitle}', '/console/${m.moduleName}/**', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));
    
    insert 
    into
        SK_MENU_ROLE_REL
        (ROLE_ID, MENU_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_admin'), (select ID from SK_MENU where MENU_NAME = '${m.moduleName}'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_MENU_ROLE_REL'));
    
    insert 
    into
        SK_MENU_ROLE_REL
        (ROLE_ID, MENU_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_user'), (select ID from SK_MENU where MENU_NAME = '${m.moduleName}'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_MENU_ROLE_REL'));
    
    insert 
    into
        SK_RES_ROLE_REL
        (ROLE_ID, RESOURCE_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_user'), (select ID from SK_RESOURCE where RESOURCE_NAME = 'res_${m.moduleName}_index'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RES_ROLE_REL'));
    
    insert 
    into
        SK_RES_ROLE_REL
        (ROLE_ID, RESOURCE_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_admin'), (select ID from SK_RESOURCE where RESOURCE_NAME = 'res_${m.moduleName}'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RES_ROLE_REL'));

<#list m.classes as c>
<#if c.module.moduleName == m.moduleName>

    insert 
    into
        SK_MENU
        (SERIAL, PARENT_ID, MENU_NAME, TITLE, MENU_TYPE, MENU_URL, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        (${c_index + 1}, (select ID from SK_MENU where MENU_NAME = '${m.moduleName}'), '${c.name?uncap_first}', '${c.title}', 'action', '/console/${m.moduleName}/${c.name?uncap_first}.do?method=list', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_MENU'));

    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${c.name?uncap_first}', '${c.title}', '/console/${m.moduleName}/${c.name?uncap_first}*', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));

    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${c.name?uncap_first}_list', '${c.title}-列表', '/console/${m.moduleName}/${c.name?uncap_first}.do?method=list*', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));

    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${c.name?uncap_first}_view', '${c.title}-查看', '/console/${m.moduleName}/${c.name?uncap_first}.do?method=view*', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));

    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${c.name?uncap_first}_edit', '${c.title}-编缉', '/console/${m.moduleName}/${c.name?uncap_first}.do?method=edit*', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));

    insert 
    into
        SK_RESOURCE
        (RESOURCE_NAME, TITLE, RESOURCE_STRING, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ('res_${c.name?uncap_first}_erase', '${c.title}-删除', '/console/${m.moduleName}/${c.name?uncap_first}.do?method=erase*', '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RESOURCE'));
     
    insert 
    into
        SK_MENU_ROLE_REL
        (ROLE_ID, MENU_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_admin'), (select ID from SK_MENU where MENU_NAME = '${c.name?uncap_first}'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_MENU_ROLE_REL'));
    
    insert 
    into
        SK_MENU_ROLE_REL
        (ROLE_ID, MENU_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_user'), (select ID from SK_MENU where MENU_NAME = '${c.name?uncap_first}'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_MENU_ROLE_REL'));
    
    insert 
    into
        SK_RES_ROLE_REL
        (ROLE_ID, RESOURCE_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_user'), (select ID from SK_RESOURCE where RESOURCE_NAME = 'res_${c.name?uncap_first}_list'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RES_ROLE_REL'));
    
    insert 
    into
        SK_RES_ROLE_REL
        (ROLE_ID, RESOURCE_ID, STATUS, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, ID) 
    values
        ((select ID from SK_ROLE where ROLE_NAME = 'role_${m.moduleName}_user'), (select ID from SK_RESOURCE where RESOURCE_NAME = 'res_${c.name?uncap_first}_view'), '1', 0, CURRENT_DATE(), null, null, NEXTVAL('SEQ_SK_RES_ROLE_REL'));
</#if>
</#list>